package net.huashitong.oversee.service;

import com.sirdc.modules.core.dao.BaseDao;
import com.sirdc.modules.sys.base.StringPKService;
import com.sirdc.modules.sys.service.SysTableService;
import net.huashitong.oversee.dao.InspectorsTpyeDao;
import net.huashitong.oversee.entity.InspectorsTpye;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InspectorsTpyeService extends StringPKService<InspectorsTpye> {

    @Autowired
    private InspectorsTpyeDao dao;

    @Autowired
    private SysTableService tableService;

    @Override
    protected BaseDao<InspectorsTpye, String> getDao() {
        return dao;
    }

    @Override
    protected void beforeSave(InspectorsTpye obj) {
        obj.setSysId(tableService.updateMaxSysId("t_bnp_inspectors_type", null));
    }



}
